package tongwentongshu.com.app.adapter;


import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import tongwentongshu.com.app.R;
import tongwentongshu.com.app.bean.DepositBean;
import tongwentongshu.com.app.bean.DouBean;
import tongwentongshu.com.app.bean.ShareDetailsBean;
import tongwentongshu.com.app.utils.GlideUtil;

/**
 * 文 件 名: MainBooksAdapter
 * 创 建 人: Allen
 * 创建日期: 16/12/24 19:55
 * 邮   箱: AllenCoder@126.com
 * 修改时间：
 * 修改备注：
 */
public class DepositAdapter extends BaseQuickAdapter<DepositBean.DataBean.DetailBean, BaseViewHolder> {
    private Context mContext;

    public DepositAdapter(Context mContext, List<DepositBean.DataBean.DetailBean> list) {
        super(R.layout.view_deosit, list);
        this.mContext = mContext;
    }

    @Override
    protected void convert(BaseViewHolder helper, DepositBean.DataBean.DetailBean item) {
        helper.setText(R.id.tv_deposit_time, item.getCreate_time());
        helper.setText(R.id.tv_deposit_money, item.getMoney_num());
        String status = "";
        switch (item.getMoney_status()) {
            case "1":
                status = "充值";
                break;
            case "2":
                status = "退款";
                break;
            case "3":
                status = "已完成退款";
                break;
            case "4":
                status = "其他";
                break;
            default:
                break;
        }
        helper.setText(R.id.tv_deposit_status, status);
    }


}
